import { getList } from '../api/index'

export let get_List = () => {
    return async (dispatch) => {
        let { data } = await getList()
        dispatch({
            type: 'GET_LIST',
            payload: data
        })
    }
}

export let detele = (index) => {
    return dispatch => {
        dispatch({
            type: 'DETELE',
            payload: index
        })
    }
}

export let save_Btn = (obj) => {
    return dispatch => {
        dispatch({
            type: 'SAVE_BTN',
            payload: obj
        })
    }
}

export let add_Btn = (obj) => {
    return dispatch => {
        dispatch({
            type: 'ADD_BTN',
            payload: obj
        })
    }
}

export let Correct = () => {
    return dispatch => {
        dispatch({
            type: 'CORRECT'
        })
    }
}

export let Pour = () => {
    return dispatch => {
        dispatch({
            type: 'POUR'
        })
    }
}